public class Test {
    public static void main(String[] args) {
        for (int i = 3; i <= 100; i+=2) {
            boolean flg = true;
            for (int j = 2; j <= Math.sqrt(i); j++) {
                if (i % j ==0) {
                    flg = false;
                }
            }
            if(flg == true) {
                System.out.println(i + "是素数");
            }
        }
    }
}
